with open('data.txt', 'r', encoding='utf-8') as f:
    print(f.read())
#查看关闭状态
print(f.closed)